<?php
class My_Loader implements Zend_Loader_Autoloader_Interface
{
    public function autoload($class)
    {
    	$dir = APPLICATION_PATH."/models";
    	if(strpos($class,"Service"))
    	{
    		$dir .= "/Service";
    		if(strpos($class,"Base"))
    		{
    			$dir .= "/Base";		
    		}
    	}
	    if(strpos($class,"DAO"))
    	{
    		$dir .= "/DAO";
    		if(strpos($class,"Base"))
    		{
    			$dir .= "/Base";		
    		}
    	}
	    if(strpos($class,"DTO"))
    	{
    		$dir .= "/DTO";
    		if(strpos($class,"Base"))
    		{
    			$dir .= "/Base";		
    		}
    	}
    	
    	if(strpos($class,"Columns"))
    	{
    		$dir .= "/DTO";
    	}
    	
    	
    	if(strcmp($dir,APPLICATION_PATH."/models")!=0)
    	{
    		Zend_Loader::loadClass($class,array($dir));
    	}
    	else
    	{
    		Zend_Loader::loadClass($class);
    	}
    }
}